export default {
  namespaced: true,
  state: {
    msg: "contact module",
    tableData: [],
  },
  mutations: {
    SET_TABLE_DATA(state, data) {
      state.tableData = data;
    },
  },
  actions: {
    async getList({ commit }) {
      const res = await fetch("http://localhost:3000/contact").then((res) =>
        res.json()
      );
      commit("SET_TABLE_DATA", res);
    },
  },
};
